﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
 <script src="jquery-latest.js" type="text/javascript"></script>
                 <script src="photobooth_min.js" type="text/javascript"></script>
  <script type="text/javascript" >

      $(function () {
          container = document.getElementById("webcam");
          gallery = document.getElementById("gallery");

          myPhotobooth = new Photobooth(container);

          myPhotobooth.onImage = function (dataUrl) {
              var myImage = document.getElementById("photo");
              myImage.src = dataUrl;
              //  alert(dataUrl);uploadImg.ashx
              $.post("uploadImg.ashx",

                        {
                            param: dataUrl, param2: $('input#ctl00_ContentPlaceHolder1_txtemail').val()
                        },
                        function (data, status) {

                            alert(data);
                        });
          };

      });
    </script> 
    <style type="text/css">
        ul
        {
            list-style-type:none;
        }
        div#webcam
        {
            width: 300px;
            border: 1px solid #333;
            height:220px;float:left;
            
        }div#gallery
        {
            width: 300px;
             border: 1px solid #333;
            height: 220px;
            float:left;
        }
       
    </style>
</head>
<body>
                    <div id="webcam"></div><div id="gallery"><img src="" id="photo"/></div>
</body>
</html>
